package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wk1un2.entity.Carousel;
import com.wk1un2.mapper.CarouselMapper;
import com.wk1un2.service.CarouselService;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class CarouselServiceImpl implements CarouselService {

	@Autowired
	private CarouselMapper CarouselMapper;// 自动注入mapper

	@Override
	public List<Map<String, Object>> getAll(int page, int limit, String c_name) {
		// TODO Auto-generated method stub
		return CarouselMapper.getAll(page, limit, c_name);
	}

	@Override
	public Integer count() {
		// TODO Auto-generated method stub
		return CarouselMapper.count();
	}

	@Override
	public Integer add(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return CarouselMapper.add(map);
	}

	@Override
	public Integer update(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return CarouselMapper.update(map);
	}

	@Override
	public Integer delete(int c_id) {
		// TODO Auto-generated method stub
		return CarouselMapper.delete(c_id);
	}

}
